﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Wix.Aura.Common;
using Wix.Aura.Common.CustomTypes;

namespace Wix.Aura.UnitTests.Common {
	[TestFixture]
	public class DirectorySearchSerialization : ComplianceCheckChildren {
		[Test]
		public void DirectorySearchIdParameter() {
			string expected = string.Format(baseXml, @"<DirectorySearch Id=""identifier"" />");
			check.DirectorySearch.Add(new DirectorySearch("identifier"));
			Assertion(expected, project);
		}

		[Test]
		public void DirectorySearchAllAttributes() {
			string expected = string.Format(baseXml, @"<DirectorySearch Id=""identifier"" AssignToProperty=""yes"" Depth=""1"" Path=""newPath"" />");
			check.DirectorySearch.Add(new DirectorySearch("identifier") { AssignToProperty = YesNoType.Yes, Depth = 1, Path = "newPath" });
			Assertion(expected, project);
		}
	}
}
